import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login'
import CourseInformation from '../components/CourseInformation'
import CourseManagement from '../components/CourseManagement'
import UnitContent from '../components/UnitContent'
import UnitInformation from '../components/UnitInformation'
import UnitTesting from '../components/UnitTesting'
import CreationCourse from '../components/CreationCourse'
import ChoiceQuestion from '../components/ChoiceQuestion'
import TrueOrFalseQuestions from '../components/TrueOrFalseQuestions'
import Video from '../components/Video'
import FindPassword from '../components/FindPassword'
import UserLogin from '../components/UserLogin'
import Register from '../components/Register'
import BlankQuestion from '../components/BlankQuestion'
Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    { path: '/', redirect: '/Login' },
    { path: '/Login', component: Login },
    { path: '/CourseInformation', component: CourseInformation, name: 'CourseInformation' },
    { path: '/CourseManagement', component: CourseManagement, name: 'CourseManagement' },
    { path: '/UnitContent', component: UnitContent, name: 'UnitContent' },
    { path: '/UnitInformation', component: UnitInformation, name: 'UnitInformation' },
    { path: '/UnitTesting', component: UnitTesting },
    { path: '/CreationCourse', component: CreationCourse },
    { path: '/ChoiceQuestion', component: ChoiceQuestion, name: 'ChoiceQuestion' },
    { path: '/CreationCourse', component: CreationCourse },
    { path: '/TrueOrFalseQuestions', component: TrueOrFalseQuestions, name: 'TrueOrFalseQuestions' },
    { path: '/CreationCourse', component: CreationCourse },
    { path: '/Video', component: Video, name: 'Video' },
    { path: '/UserLogin', component: UserLogin, name: 'UserLogin' },
    { path: '/FindPassword', component: FindPassword, name: 'FindPassword' },
    { path: '/Register', component: Register, name: 'Register' },
    { path: '/BlankQuestion', component: BlankQuestion, name: 'BlankQuestion' }
  ]
})
module.export = {
  dev: {
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/api': {
        target: 'http://127.0.0.1:8088',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      host: 'localhost',
      port: 8080,
      autoOpenBrowser: false,
      errorOverlay: true,
      notifyOnErrors: true,
      poll: false,
      devtool: 'cheap-module-eval-source-map',
      cacheBusting: true,
      cssSourceMap: true
    }
  }
}
